import { _decorator, Component, Node, tween, Vec3, Transform, quaternionFromEuler } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('model')

export class model extends Component {
    @property(Node) revolve: Node;
    start() {
        
        // const transformComponent = this.revolve.getComponent(Transform);
        console.log(this.revolve.rotation);
        // 或者使用欧拉角直接设置
        // this.revolve.rotation  = quaternionFromEuler(0, 180, 0); // 绕Y轴旋转90度
        // let obj = {
        //     rotation: 0
        // }
        // tween(obj).to(3, {rotation: 360},{
        //     onUpdated:() => {
        //         // this.revolve.rotation = obj.rotation;
        //         console.log(this.revolve);
                
        //     }
        // }).union().start();
    }
    onLoad() {
    }


    update(deltaTime: number) {
        
    }
}


